/**
 * @param {number[]} nums
 * @return {number}
 */
var rob = function (nums) {
  // nums.sort((a,b)=>a-b)
  let dp = []
  dp[0] = nums[0]
  dp[1] = Math.max(nums[0], nums[1])
  let i = 2
  for (; i < nums.length - 2; i++) {
    dp[i] = Math.max(dp[i - 1], dp[i - 2] + nums[i])
  }
  if(dp[i]<dp[i-1])
};